From 361f01aebc40d039b253e0112552928f7b149d1d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 6 Jun 2005 08:14:16 +0000 Subject: [PATCH] bitkeeper revision 1.1678 (42a405d8raiThtAq9NRXuuFg6ur1qA) Attached patch fixes FP initialization bug with x86-64 xenlinux.=20 With this patch, # of testcase failures with LTP is < 5 (out of 800), almost same results as the native x86-64 Linux. The other two patches for LTP are coming soon; with these, all the testcases will pass (except the ones that fail on the native x86-64 Linux). Signed-off-by: Jun Nakajima --- linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c | 2 -- linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c index 32b813661f..9b9a974337 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c @@ -336,9 +336,7 @@ void __init cpu_init (void) CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7); #undef CD -#if 0 fpu_init(); -#endif #ifdef CONFIG_NUMA numa_add_cpu(cpu); diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h index 7c70eac425..8d4d9e32ac 100644 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h @@ -147,12 +147,12 @@ struct alt_instr { #define clts() (HYPERVISOR_fpu_taskswitch(0)) static inline unsigned long read_cr0(void) { - BUG(); + return 0; } static inline void write_cr0(unsigned long val) { - BUG(); + /* Ignore, Linux tries to clear TS and EM */ } static inline unsigned long read_cr3(void) -- 2.30.2